<?php
/**
 * Created by PhpStorm.
 * User: wodrow
 * Date: 18-12-13
 * Time: 下午3:18
 */

namespace common\models\credit_old_app_tables;


use Yii;

/**
 * This is the model class for table "{{%hjc_audit_result}}".
 *
 * @property int $har_id
 * @property string $har_ch_date
 * @property int $har_ch_result
 * @property string $har_ch_detail
 * @property string $har_o_number
 */
class SlHjcAuditResult extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%hjc_audit_result}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_old_app');
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['har_ch_result'], 'integer'],
            [['har_ch_detail'], 'string'],
            [['har_ch_date'], 'string', 'max' => 50],
            [['har_o_number'], 'string', 'max' => 20],
            [['har_o_number'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'har_id' => Yii::t('app', 'Har ID'),
            'har_ch_date' => Yii::t('app', 'Har Ch Date'),
            'har_ch_result' => Yii::t('app', 'Har Ch Result'),
            'har_ch_detail' => Yii::t('app', 'Har Ch Detail'),
            'har_o_number' => Yii::t('app', 'Har O Number'),
        ];
    }
}